package org.ksoap2.serialization;

public class SoapPrimitive extends AttributeContainer
{
  String namespace;
  String name;
  String value;

  public SoapPrimitive(String namespace, String name, String value)
  {
    this.namespace = namespace;
    this.name = name;
    this.value = value;
  }

  public boolean equals(Object o) {
    if (!(o instanceof SoapPrimitive)) {
      return false;
    }
    SoapPrimitive p = (SoapPrimitive)o;
    boolean varsEqual = (this.name.equals(p.name)) && (this.namespace == null ? p.namespace == null : this.namespace.equals(p.namespace)) && (this.value == null ? p.value == null : this.value.equals(p.value));

    return (varsEqual) && (attributesAreEqual(p));
  }

  public int hashCode() {
    return this.name.hashCode() ^ (this.namespace == null ? 0 : this.namespace.hashCode());
  }

  public String toString() {
    return this.value;
  }

  public String getNamespace() {
    return this.namespace;
  }

  public String getName() {
    return this.name;
  }
}